<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>学生选课系统 - 个人中心</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
  <link rel="stylesheet" href="../css/personalcenter.css">
</head>
<body class="bg-gray-50 font-sans">
  <!-- 顶部导航栏 -->
  <header class="bg-white shadow-md fixed w-full z-50 transition-all duration-300" id="navbar">
    <div class="container mx-auto px-4 py-3 flex items-center justify-between">
      <div class="flex items-center space-x-2">
        <i class="fa-solid fa-graduation-cap text-blue-600 text-2xl"></i>
        <h1 class="text-xl font-bold text-gray-800">学生选课系统</h1>
      </div>
      

      <div class="flex items-center space-x-4">
        <div class="relative">
          <button class="flex items-center space-x-2 focus:outline-none" id="userMenuBtn">
            <img src="../images/courseimages/user.jpg" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-blue-500">
            <span class="hidden md:inline-block text-gray-700 font-medium">张三</span>
            <i class="fa-solid fa-angle-down text-gray-500"></i>
          </button>
          
          <!-- 用户下拉菜单 -->
          <div class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 hidden z-50" id="userMenu">
            <a href="../html/personalcenter.html" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
              <i class="fa-solid fa-user mr-2"></i>个人中心
            </a>
            <a href="../html/accountsetting.html" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
              <i class="fa-solid fa-cog mr-2"></i>账号设置
            </a>
            <div class="border-t border-gray-100 my-1"></div>
            <a href="../html/login.html" class="block px-4 py-2 text-sm text-red-600 hover:bg-gray-100">
              <i class="fa-solid fa-sign-out-alt mr-2"></i>退出登录
            </a>
          </div>
        </div>
        
        <button class="md:hidden focus:outline-none" id="mobileMenuBtn">
          <i class="fa-solid fa-bars text-gray-700 text-xl"></i>
        </button>
      </div>
    </div>
    
    <!-- 移动端菜单 -->
    <div class="md:hidden bg-white border-t border-gray-100 hidden" id="mobileMenu">
      <div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
        <a href="../html/home.html" class="block px-3 py-2 rounded-md text-base font-medium text-blue-600 bg-blue-50">首页</a>
        <a href="../html/selectcoursecenter.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-600 hover:text-blue-600 hover:bg-blue-50">选课</a>
        <a href="../html/coursetable.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-600 hover:text-blue-600 hover:bg-blue-50">课程表</a>
        <a href="../html/gradesselect.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-600 hover:text-blue-600 hover:bg-blue-50">成绩查询</a>
      </div>
    </div>
  </header>

  <!-- 主内容区 -->
  <main class="container mx-auto pt-24 pb-12 px-4 md:px-6">
    <div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
      <!-- 侧边栏 -->
      <aside class="lg:col-span-1">
        <div class="bg-white rounded-xl shadow-md overflow-hidden sticky top-24">
          <div class="bg-gradient-to-r from-blue-500 to-indigo-600 p-4">
            <div class="flex items-center space-x-4">
              <img src="../images/courseimages/user.jpg" alt="用户头像" class="w-16 h-16 rounded-full object-cover border-4 border-white shadow-lg">
              <div>
                <h2 class="text-white font-bold text-xl">张三</h2>
                <p class="text-blue-100 text-sm">计算机科学与技术学院</p>
                <p class="text-blue-100 text-sm">学号: 20230001</p>
              </div>
            </div>
          </div>
          
          <nav class="p-4">
            <ul class="space-y-1">
              <li>
                <a href="../html/personalcenter.html" class="flex items-center p-3 text-blue-600 bg-blue-50 rounded-lg font-medium">
                  <i class="fa-solid fa-user-circle w-6"></i>
                  <span>个人信息</span>
                </a>
              </li>
              <li>
                <a href="../html/mycollect.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-book w-6"></i>
                  <span>收藏课程</span>
                </a>
              </li>
              <li>
                <a href="../html/coursetable.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-calendar-alt w-6"></i>
                  <span>课程表</span>
                </a>
              </li>
              <li>
                <a href="../html/courseevaluate.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-star w-6"></i>
                  <span>课程评价</span>
                </a>
              </li>
              <li>
                <a href="../html/gradesselect.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-graduation-cap w-6"></i>
                  <span>成绩查询</span>
                </a>
              </li>
              <li>
                <a href="../html/accountsetting.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-cog w-6"></i>
                  <span>账号设置</span>
                </a>
              </li>
            </ul>
          </nav>
        </div>
      </aside>
      
      <!-- 主内容 -->
      <div class="lg:col-span-3 space-y-6">
        <!-- 个人信息卡片 -->
        <div class="bg-white rounded-xl shadow-md p-6 transform hover:shadow-lg transition-shadow">
          <div class="flex items-center justify-between mb-6">
            <h2 class="text-2xl font-bold text-gray-800">个人信息</h2>
            <button class="text-blue-600 hover:text-blue-800 font-medium flex items-center transition-colors" id="editProfileBtn">
              <i class="fa-solid fa-pencil-alt mr-1"></i> 编辑
            </button>
          </div>
          
          <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <div class="space-y-4">
              <div class="flex items-center">
                <span class="w-24 text-gray-500">姓名:</span>
                <span class="text-gray-800 font-medium">张三</span>
              </div>
              <div class="flex items-center">
                <span class="w-24 text-gray-500">性别:</span>
                <span class="text-gray-800">男</span>
              </div>
              <div class="flex items-center">
                <span class="w-24 text-gray-500">出生日期:</span>
                <span class="text-gray-800">2000-01-15</span>
              </div>
              <div class="flex items-center">
                <span class="w-24 text-gray-500">政治面貌:</span>
                <span class="text-gray-800">共青团员</span>
              </div>
            </div>
            
            <div class="space-y-4">
              <div class="flex items-center">
                <span class="w-24 text-gray-500">学院:</span>
                <span class="text-gray-800">计算机科学与技术学院</span>
              </div>
              <div class="flex items-center">
                <span class="w-24 text-gray-500">专业:</span>
                <span class="text-gray-800">软件工程</span>
              </div>
              <div class="flex items-center">
                <span class="w-24 text-gray-500">年级:</span>
                <span class="text-gray-800">2023级</span>
              </div>
              <div class="flex items-center">
                <span class="w-24 text-gray-500">联系电话:</span>
                <span class="text-gray-800">13800138000</span>
              </div>
            </div>
          </div>
        </div>
        
        <!-- 已选课程卡片 -->
        <div class="bg-white rounded-xl shadow-md p-6 transform hover:shadow-lg transition-shadow">
          <div class="flex items-center justify-between mb-6">
            <h2 class="text-2xl font-bold text-gray-800">已选课程</h2>
            <a href="../html/mycollect.html" class="text-blue-600 hover:text-blue-800 font-medium flex items-center transition-colors">
              查看全部 <i class="fa-solid fa-angle-right ml-1"></i>
            </a>
          </div>
          
          <div class="overflow-x-auto">
            <table class="min-w-full divide-y divide-gray-200">
              <thead>
                <tr>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">课程代码</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">课程名称</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">学分</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">上课时间</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">授课教师</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                </tr>
              </thead>
              <tbody class="bg-white divide-y divide-gray-200">
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">CS101</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">数据结构</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">4.0</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">周一 3-4节</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">李四</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-blue-600 hover:text-blue-800 cursor-pointer">
                    <button class="mr-2">详情</button>
                    <button class="text-red-600 hover:text-red-800">退选</button>
                  </td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">CS102</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">计算机网络</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">3.0</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">周二 5-6节</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">王五</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-blue-600 hover:text-blue-800 cursor-pointer">
                    <button class="mr-2">详情</button>
                    <button class="text-red-600 hover:text-red-800">退选</button>
                  </td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">CS103</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">操作系统</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">4.0</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">周三 3-4节</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">赵六</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-blue-600 hover:text-blue-800 cursor-pointer">
                    <button class="mr-2">详情</button>
                    <button class="text-red-600 hover:text-red-800">退选</button>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
        
        <!-- 课程评价卡片 -->
        <div class="bg-white rounded-xl shadow-md p-6 transform hover:shadow-lg transition-shadow">
          <div class="flex items-center justify-between mb-6">
            <h2 class="text-2xl font-bold text-gray-800">待评价课程</h2>
            <a href="../evaluate/evaluate.html" class="text-blue-600 hover:text-blue-800 font-medium flex items-center transition-colors">
              查看全部 <i class="fa-solid fa-angle-right ml-1"></i>
            </a>
          </div>
          
          <div class="space-y-4">
            <div class="border border-gray-200 rounded-lg p-4 hover:border-blue-300 transition-colors">
              <div class="flex justify-between items-start mb-3">
                <div>
                  <h3 class="font-medium text-gray-900">数据结构</h3>
                  <p class="text-sm text-gray-500">授课教师: 李四</p>
                </div>
                <span class="bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded">
                  待评价
                </span>
              </div>
              
              <div class="flex items-center justify-between mt-4">
                <button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition-colors">
                  立即评价
                </button>
              </div>
            </div>
            
            <div class="border border-gray-200 rounded-lg p-4 hover:border-blue-300 transition-colors">
              <div class="flex justify-between items-start mb-3">
                <div>
                  <h3 class="font-medium text-gray-900">计算机网络</h3>
                  <p class="text-sm text-gray-500">授课教师: 王五</p>
                </div>
                <span class="bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded">
                  待评价
                </span>
              </div>
              
              <div class="flex items-center justify-between mt-4">
                <button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition-colors">
                  立即评价
                </button>
              </div>
            </div>
          </div>
        </div>
        
        <!-- 成绩查询卡片 -->
        <div class="bg-white rounded-xl shadow-md p-6 transform hover:shadow-lg transition-shadow">
          <div class="flex items-center justify-between mb-6">
            <h2 class="text-2xl font-bold text-gray-800">成绩查询</h2>
            <div class="flex items-center space-x-2">
              <select class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                <option>2023-2024学年 第一学期</option>
                <option>2022-2023学年 第二学期</option>
                <option>2022-2023学年 第一学期</option>
              </select>
              <button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition-colors">
                查询
              </button>
            </div>
          </div>
          
          <div class="overflow-x-auto">
            <table class="min-w-full divide-y divide-gray-200">
              <thead>
                <tr>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">课程代码</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">课程名称</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">学分</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">成绩</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">绩点</th>
                </tr>
              </thead>
              <tbody class="bg-white divide-y divide-gray-200">
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">CS001</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">高等数学</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">5.0</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-medium">92</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">4.0</td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">CS002</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">大学物理</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">4.0</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-medium">85</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">3.7</td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">CS003</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">程序设计基础</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">4.0</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-medium">95</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">4.0</td>
                </tr>
              </tbody>
            </table>
          </div>
          
          <div class="mt-6 pt-4 border-t border-gray-200">
            <div class="flex justify-between items-center">
              <div class="text-sm text-gray-600">
                <span class="font-medium">平均绩点:</span> 3.9
              </div>
              <div class="text-sm text-gray-600">
                <span class="font-medium">排名:</span> 前10%
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </main>

  <!-- 页脚 -->
  <footer class="bg-gray-800 text-white py-12">
    <div class="container mx-auto px-4 md:px-6">
      <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
        <div>
          <h3 class="text-lg font-bold mb-4">学生选课系统</h3>
          <p class="text-gray-400 text-sm">为学生提供便捷的选课服务和个人信息管理</p>
        </div>
        
        <div>
          <h3 class="text-lg font-bold mb-4">快速链接</h3>
          <ul class="space-y-2 text-sm">
            <li><a href="../html/home.html" class="text-gray-400 hover:text-white transition-colors">首页</a></li>
            <li><a href="../html/selectcoursecenter.html" class="text-gray-400 hover:text-white transition-colors">选课中心</a></li>
            <li><a href="../html/coursetable.html" class="text-gray-400 hover:text-white transition-colors">课程表</a></li>
            <li><a href="../html/gradesselect.html" class="text-gray-400 hover:text-white transition-colors">成绩查询</a></li>
          </ul>
        </div>
        
        <div>
          <h3 class="text-lg font-bold mb-4">帮助支持</h3>
          <ul class="space-y-2 text-sm">
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">使用指南</a></li>
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">意见反馈</a></li>
          </ul>
        </div>
        
        <div>
          <h3 class="text-lg font-bold mb-4">联系我们</h3>
          <ul class="space-y-2 text-sm">
            <li class="flex items-center text-gray-400">
              <i class="fa-solid fa-envelope mr-2"></i>
              <span>support@example.com</span>
            </li>
            <li class="flex items-center text-gray-400">
              <i class="fa-solid fa-phone mr-2"></i>
              <span>010-12345678</span>
            </li>
            <li class="flex items-center text-gray-400">
              <i class="fa-solid fa-map-marker-alt mr-2"></i>
              <span>博雅甲512</span>
            </li>
          </ul>
        </div>
      </div>
      
      <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400 text-sm">
        <p>© 2023 学生选课系统 版权所有</p>
      </div>
    </div>
  </footer>

  <!-- 编辑个人信息模态框 -->
  <div class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden" id="editProfileModal">
    <div class="bg-white rounded-xl shadow-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto transform transition-all">
      <div class="p-6 border-b border-gray-200">
        <div class="flex justify-between items-center">
          <h3 class="text-xl font-bold text-gray-900">编辑个人信息</h3>
          <button class="text-gray-400 hover:text-gray-500 focus:outline-none" id="closeModalBtn">
            <i class="fa-solid fa-times text-xl"></i>
          </button>
        </div>
      </div>
      
      <div class="p-6">
        <form id="editProfileForm">
          <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">姓名</label>
              <input type="text" value="张三" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
            </div>
            
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">性别</label>
              <select class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                <option>男</option>
                <option>女</option>
              </select>
            </div>
            
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">出生日期</label>
              <input type="date" value="2000-01-15" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
            </div>
            
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">政治面貌</label>
              <select class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                <option>共青团员</option>
                <option>中共党员</option>
                <option>群众</option>
              </select>
            </div>
            
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">学院</label>
              <input type="text" value="计算机科学与技术学院" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" disabled>
            </div>
            
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">专业</label>
              <input type="text" value="大数据" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" disabled>
            </div>
            
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">年级</label>
              <input type="text" value="2023级" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" disabled>
            </div>
            
            <div>
              <label class="block text-sm font-medium text-gray-700 mb-1">联系电话</label>
              <input type="tel" value="13800138000" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
            </div>
          </div>
          
          <div class="mt-6 pt-6 border-t border-gray-200 flex justify-end space-x-3">
            <button type="button" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors" id="cancelEditBtn">
              取消
            </button>
            <button type="submit" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors">
              保存
            </button>
          </div>
        </form>
      </div>
    </div>
  </div>

  <script src="../js/personalcenter.js"></script>
</body>
</html>
    